<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 会员加群次数变动表 基类
 * @Entity
 * @Table(name="fa_user_group_log", id={"id"})
 * @DDL("CREATE TABLE `fa_user_group_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  `num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '变更余额',
  `before` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '变更前余额',
  `after` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '变更后余额',
  `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  `group_id` int(10) unsigned DEFAULT NULL COMMENT '群组id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员加群次数变动表'")
 * @property int $id 
 * @property int $userId 会员ID
 * @property int $num 变更余额
 * @property int $before 变更前余额
 * @property int $after 变更后余额
 * @property string $memo 备注
 * @property int $createtime 创建时间
 * @property int $groupId 群组id
 */
abstract class UserGroupLogBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 会员ID
     * user_id
     * @Column(name="user_id", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $userId;

    /**
     * 获取 userId - 会员ID
     *
     * @return int
     */ 
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * 赋值 userId - 会员ID
     * @param int $userId user_id
     * @return static
     */ 
    public function setUserId($userId)
    {
        $this->userId = $userId;
        return $this;
    }

    /**
     * 变更余额
     * num
     * @Column(name="num", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $num;

    /**
     * 获取 num - 变更余额
     *
     * @return int
     */ 
    public function getNum()
    {
        return $this->num;
    }

    /**
     * 赋值 num - 变更余额
     * @param int $num num
     * @return static
     */ 
    public function setNum($num)
    {
        $this->num = $num;
        return $this;
    }

    /**
     * 变更前余额
     * before
     * @Column(name="before", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $before;

    /**
     * 获取 before - 变更前余额
     *
     * @return int
     */ 
    public function getBefore()
    {
        return $this->before;
    }

    /**
     * 赋值 before - 变更前余额
     * @param int $before before
     * @return static
     */ 
    public function setBefore($before)
    {
        $this->before = $before;
        return $this;
    }

    /**
     * 变更后余额
     * after
     * @Column(name="after", type="int", length=10, accuracy=0, nullable=false, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $after;

    /**
     * 获取 after - 变更后余额
     *
     * @return int
     */ 
    public function getAfter()
    {
        return $this->after;
    }

    /**
     * 赋值 after - 变更后余额
     * @param int $after after
     * @return static
     */ 
    public function setAfter($after)
    {
        $this->after = $after;
        return $this;
    }

    /**
     * 备注
     * memo
     * @Column(name="memo", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $memo;

    /**
     * 获取 memo - 备注
     *
     * @return string
     */ 
    public function getMemo()
    {
        return $this->memo;
    }

    /**
     * 赋值 memo - 备注
     * @param string $memo memo
     * @return static
     */ 
    public function setMemo($memo)
    {
        $this->memo = $memo;
        return $this;
    }

    /**
     * 创建时间
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $createtime;

    /**
     * 获取 createtime - 创建时间
     *
     * @return int
     */ 
    public function getCreatetime()
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 创建时间
     * @param int $createtime createtime
     * @return static
     */ 
    public function setCreatetime($createtime)
    {
        $this->createtime = $createtime;
        return $this;
    }

    /**
     * 群组id
     * group_id
     * @Column(name="group_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $groupId;

    /**
     * 获取 groupId - 群组id
     *
     * @return int
     */ 
    public function getGroupId()
    {
        return $this->groupId;
    }

    /**
     * 赋值 groupId - 群组id
     * @param int $groupId group_id
     * @return static
     */ 
    public function setGroupId($groupId)
    {
        $this->groupId = $groupId;
        return $this;
    }

}
